package com.njupt.sellsec.result;

import com.sun.org.apache.bcel.internal.classfile.Code;

/**
 * @Author: XJL
 * @Description:
 * @Date: Create in 14:48 2018/7/27
 * @Modified By:
 **/

public class CodeMsg {

    private String msg;

    private Integer code;

    public static CodeMsg SUCCESS = new CodeMsg(0,"success");
    public static CodeMsg SERVER_ERROR = new CodeMsg(500100,"server_error");
    public static CodeMsg BIND_ERROR = new CodeMsg(500101, "参数校验异常：%s");
    public static CodeMsg REQUEST_ILLEAGER = new CodeMsg(500102,"请求参数非法");
    public static CodeMsg QEQUEST_LIMITED_REPEAUED = new CodeMsg(500103,"请求太频繁");

    //登陆模块 5002XXX
    public static CodeMsg SESSION_ERROR = new CodeMsg(500210,"Session不存在或者已经失效");
    public static CodeMsg PASSWORD_EMPTY = new CodeMsg(500211,"登陆密码不能为空");
    public static CodeMsg MOBILE_EMPTY = new CodeMsg(500212,"手机号不能为空");
    public static CodeMsg MOBILE_ERROR  = new CodeMsg(500213,"手机号格式错误");
    public static CodeMsg MOBILE_NOT_EXIST = new CodeMsg(500214,"手机号不存在");
    public static CodeMsg PASSWORD_ERROR = new CodeMsg(500214,"密码错误");
    public static CodeMsg SECSELL_FAILRE = new CodeMsg(500215,"验证码加载异常");

    public static CodeMsg SEC_SELL_OVER = new CodeMsg(500400,"秒杀活动已经结束");
    public static CodeMsg REPEATE_SECSELL = new CodeMsg(500401,"重复下单");
    public static CodeMsg ORDER_NOT_EXITS = new CodeMsg(500500,"订单不存在");

    private CodeMsg(int code, String success) {
        this.code = code;
        this.msg = success;
    }


    public String getMsg() {
        return msg;
    }



    public Integer getCode() {
        return code;
    }


}
